Skip to main content

Capturing Screenshots

QuickPose composites the camera feed and skeleton overlay into a single hardware surface, which means standard screenshot tools cannot read the pixels back. The SDK provides a native captureFrame method on each platform to capture the composited camera + overlay image.

On iOS the composited frame is available as overlayState.image (UIImage) in your onFrame callback. You can save or share this directly:

quickPose.start(features: [.overlay(.wholeBody)], onFrame: { status, image, features, feedback, landmarks in
if case .success(_, _) = status {
overlayImage = image
// image is a UIImage of camera + overlay, ready to save or share
}
})

To share via the system share sheet:

func shareScreenshot() {
guard let image = overlayImage else { return }
let activityVC = UIActivityViewController(activityItems: [image], applicationActivities: nil)
UIApplication.shared.windows.first?.rootViewController?.present(activityVC, animated: true)
}